<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">
    <h:head><title>Welcome to OTV_JSF_Spring_Hibernate_Project</title></h:head>
    <h:body>
        <h:form>
            <table>
                <tr>
                    <td><h:outputLabel for="logradouro" value="Logradouro : " /></td>
                    <td><p:inputText id="logradouro" value="#{enderecoMB.logradouro}">
                            <f:validateLength minimum="5" />
                            <p:ajax event="blur" update="logradouroMsg" />
                        </p:inputText>
                        <p:message id="logradouroMsg" for="logradouro" display="icon"/>
                    </td>
                </tr>
                <tr>
                    <td><p:commandButton id="adicionarEndereco" value="Adicionar" action="#{enderecoMB.adicionarEndereco()}" ajax="false"/></td>
                    <td><p:commandButton id="limparCampos" value="Reset" action="#{enderecoMB.limparCampos()}" ajax="false"/></td>
                </tr>
            </table>
        </h:form>
    </h:body>
</html>
